<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Description" content="Cynthia项目缺陷管理系统，拥有表单流程化设计，可视化拖动布局等功能，提供项目管理，缺陷管理，，统计，查询等服务，是您项目上的好帮手！">
<meta name="Keywords" content="Cynthia,BUG管理,项目管理 ,缺陷管理,任务管理,BUG,缺陷,开源">
<title>Cynthia 欢迎您!</title>
<link href="../lib/bootstrap2/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../lib/bootstrap2/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css">
<link href="../lib/g_bootstrap/css/google-bootstrap.css" rel="stylesheet" type="text/css">
<link href="../lib/jquery.plugins/jquery-ui/css/ui-lightness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" type="text/css">

<link href="../css/top.css" rel="stylesheet" type="text/css">
<link href="../css/admin_template_edit.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src='../lib/jquery/jquery-1.9.3.min.js'></script>
<script type="text/javascript" src="../lib/jquery.plugins/jquery-ui/js/jquery-ui-1.10.3.min.js"></script>
<script type="text/javascript" src='../lib/bootstrap2/js/bootstrap.cynthia.min.js'></script>
<script type="text/javascript" src="../js/util.js"></script>
<script type="text/javascript" src="../js/admin/admin_template_edit.js?v=25"></script>
</head>
<body>

<div class="container-fluid">
	<div id ="header-nav">
	</div>
	<!--
	<div class="row-fluid mid-toolbar affix">
		<div class="span12 middle">
			<button class="btn" type="button" data-toggle='modal'>预览</button>
			  <button class="btn" type="button" data-toggle='modal'>保存</button>
			<button class="btn" type="button" data-toggle='modal'>取消</button>
		</div>
	</div>
	-->
	<div class="row-fluid">
		<div class="sidebar-nav">
			<ul class="nav nav-list accordion-group">
				<li class="nav-header">
					<i class="icon-minus icon-white"></i>
					布局管理
				</li>
				<li class="rows">
					<div class="lyrow">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a>
						<div class="preview">
			            	<span> 一行一列</span>
			            </div>
						
						<span class="drag label">
							<i class="icon-move"></i>
							拖动
						</span>
						
						<div class="view">
				            <div class="row-fluid clearfix">
				               <div class="span12 column large-col"></div>
				            </div>
			            </div>
					</div>
					<div class="lyrow">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a>
						<div class="preview">
                            <span>一行两列</span>
			            </div>
			            
						<span class="drag label">
							<i class="icon-move"></i>
							拖动
						</span>
						
						<div class="view">
				            <div class="row-fluid clearfix">
				               <div class="span6 column mid-col"></div>
				               <div class="span6 column mid-col"></div>
				            </div>
			            </div>
					</div>
					<div class="lyrow">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a>
						<div class="preview">
                            <span>一行三列</span>
			            </div>
			             
						<span class="drag label">
							<i class="icon-move"></i>
							拖动
						</span>
						
						<div class="view">
				            <div class="row-fluid clearfix">
				               <div class="span4 column mini-col"></div>
				               <div class="span4 column mini-col"></div>
				               <div class="span4 column mini-col"></div>
				            </div>
			            </div>
					</div>
				</li>
			</ul>
			<ul class="nav nav-list accordion-group">
				<li class="nav-header">
					<i class="icon-minus icon-white"></i>
					表单元素
				</li>
				<li class="boxes">
					<div class="box box-element" type="t_input" dataType="dt_string">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span>
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span>  
					    <div class="preview">单行输入</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label" >单行输入</label>
					    	<div class="controls">
					    		<input type="text" id="inputEmail" placeholder="单行输入" />
					    	</div>
					    </div>
					</div>
					<div class="box box-element" type="t_input" dataType="dt_timestamp">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span>
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span>  
					    <div class="preview">时间字段</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label" >时间字段</label>
						    <input type="text" placeholder="2014-01-10 12:20:20" />
					    </div>
					</div>
					<div class="box box-element" type="t_input" dataType="dt_text">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span> 
					    <div class="preview">多行输入</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label">多行输入</label>
						    <textarea rows="" cols=""></textarea>
					    </div>
					</div>
					<div class="box box-element" type="t_selection" dataType="dt_single">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span>
                        <span class='configuration btn-option'>
                    		<button class='btn btn-mini'>配置选项</button>
                    	</span>
					    <div class="preview">单选框</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label">单选</label>
						    <select>
						    	
						    </select>
					    </div>
					</div>
					<div class="box box-element" type="t_selection" dataType="dt_multiple">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span>
                        <span class='configuration btn-option'>
                    		<button class='btn btn-mini'>配置选项</button>
                    	</span>
					    <div class="preview">多选框</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label">多选框</label>
						    <select class="multiple" multiple="multiple">
						    	
						    </select>
					    </div>
					</div>
					<div class="box box-element" type="t_attachment" dataType="dt_attachment">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span> 
					    <div class="preview">附件</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label">附件</label>
						    <select class="multiple" multiple="multiple">
						    	
						    </select>
					    </div>
					</div>
					<div class="box box-element" type="t_reference" dataType="dt_single">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span> 
					    <div class="preview">单行引用</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label" for="">单行引用</label>
						    <select>
						    </select>
					    </div>
					</div>
					<div class="box box-element" type="t_reference" dataType="dt_multiple">
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
						<span class="configuration btn-edit">
							<button class="btn btn-mini">编辑</button>
						</span> 
					    <div class="preview">多行引用</div>
					    <div class="view control-group form-horizontal">
					    	<label class="control-label">多选框</label>
						    <select class="multiple" multiple="multiple">
						    	
						    </select>
					    </div>
					</div>
					<!--  
					<div class="box box-element"> 
						<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a> 
						<span class="drag label"><i class="icon-move"></i>拖动</span> 
					    <div class="preview">文本编辑器</div>
					    <div class="view"> <img style="width:20px;height: 20px;" alt="140x140" src="../images/logo.png"> </div>
					</div>
					-->
				</li>
			</ul>
			
		</div>
		<div class="main-container" id="main-container">
			<!--  
			<div class="lyrow ui-draggable" style="display: block;">
				<a href="#close" class="remove label label-important"><i class="icon-remove icon-white"></i>删除</a>
				<div class="preview">
                          <span>一行三列</span>
	            </div>
				<span class="drag label">
					<i class="icon-move"></i>
					拖动
				</span>
				<div class="view">
		            <div class="row-fluid clearfix">
		               <div class="span4 column ui-sortable mini-col"></div>
		               <div class="span4 column ui-sortable mini-col"></div>
		               <div class="span4 column ui-sortable mini-col"></div>
		            </div>
	            </div>
			</div> 
			-->
		</div>
	</div>
</div>


<div id="editTemplateFieldDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h5 id="myModalLabel">编辑字段</h5>
    </div>
    <div class="modal-body">
        <form class="form-horizontal">
            <div class="control-group">
                <label class="control-label danger" for="input_fieldName">字段名称：</label>
                <div class="controls">
                    <input type="text" id="input_fieldName" />
                </div>
            </div>
            
            <!-- 时间类型独有 -->
            <div class="control-group dt_timestamp control_show" style='display:none'>
                <label class="control-label danger" for="input_fieldName">精度配置：</label>
                <div class="controls">
                	<select id="input_timestampFormat" style="width:228px;">
                        <option value="yyyy-MM-dd HH:mm:ss" selected>精确到秒</option>
                        <option value="yyyy-MM-dd HH:mm">精确到分</option>
                        <option value="yyyy-MM-dd HH">精确到时</option>
                        <option value="yyyy-MM-dd">精确到天</option>
                        <option value="yyyy-MM">精确到月</option>
                        <option value="yyyy">精确到年</option>
                    </select>
                </div>
            </div>
            
            <div class="control-group dt_timestamp control_show" style='display:none'>
                <label class="control-label danger" for="input_fieldName">默认当前：</label>
                <div class="controls">
                	<select id="date_curtime" style="width:228px;">
                        <option value="true">是</option>
                        <option value="false" selected>否</option>
                    </select>
                </div>
            </div>
            <!-- 时间类型独有结束 -->
			
            <div class="control-group">
                <label class="control-label" for="input_fieldDescription">字段描述：</label>
                <div class="controls">
                    <textarea id="input_fieldDescription"></textarea>
                </div>
            </div>
            
            <div class="control-group">
                <label class="control-label" for="input_fieldTip">字段提示：</label>
                <div class="controls">
                    <textarea id="input_fieldTip"></textarea>编辑字段时能够看到！
                </div>
            </div>
			
			<div class="control-group" style="display: none;">
                <label class="control-label" for="input_fieldSize">字段大小：</label>
                <div class="controls">
                    <select id="input_fieldSize" style="width:228px;">
                    	<option value='1'>正常</option>
                    	<option value='2'>加倍</option>
                    </select>
                </div>
            </div>
            
            
            <div class="control-group" id="input_defaultValue_div">
                <label class="control-label" for="input_defaultValue_controls">默认取值：</label>
                <div class="controls" id="input_defaultValue_controls">
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="select_controlFieldId">控制字段：</label>
                <div class="controls">
                    <select id="select_controlFieldId" onchange="initControlOptions()" style="width:228px;">
                        <option value="">无</option>
                    </select>
                </div>
            </div>

            <div class="control-group" id="select_controlOptionId_div">
                <label class="control-label" for="select_controlOptionId">控制选项：</label>
                <div class="controls">
                    <select id="select_controlOptionId" multiple onchange="checkClear(select_controlOptionId)" style="width:228px;">
                        <option value="">无</option>
                    </select>
                </div>
            </div>

            <div class="control-group" id="select_controlActionId_div">
                <label class="control-label" for="select_controlActionId">控制动作：</label>
                <div class="controls">
                    <select id="select_controlActionId" multiple onchange="checkClear(select_controlOptionId)" style="width:228px;">
                    </select>
                    <input type="button" value="添加" onclick="addControlActions()">
                </div>
            </div>

            <div class="control-group" id="controlRoles_div">
                <table class="table" id="controlRoles_table">
                </table>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true" id="cancelEditField">取消</button>
        <button class="btn btn-primary" onclick="saveOrUpdateField()">保存</button>
    </div>
</div>


<div id="editFieldOptionsDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h5 >编辑字段选项</h5>
    </div>
    <div class="modal-body">
    	<button class="btn btn-danger" onclick="initCreateFieldOption()">新建</button>
    	<table class='table table-striped table-condensed' id='editOptionsTable'>
    		<thead>
    			<tr>
    				<th>选项名称</th><th>是否禁用</th><th>删除</th>&nbsp;&nbsp;<span class='label label-success'>可拖动排序</span>
    			</tr>
    		</thead>
    		<tbody>
    			
    		</tbody>
    	</table>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true" id="cancelEditFieldOptions()">取消</button>
        <button class="btn btn-primary" onclick="saveOrUpdateFieldOptions()">保存</button>
    </div>
</div>

<div id="editFieldOptionNameDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h5>选项名称</h5>
    </div>
    <div class="modal-body">
    	 <form class="form-horizontal">
            <div class="control-group">
                <label class="control-label danger" for="input_modify_option_name">选项名称：</label>
                <div class="controls">
                    <input type="text" id="input_modify_option_name" />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label danger" for="input_modify_option_forbidden">是否禁用：</label>
                <div class="controls">
                    <select id="input_modify_option_forbidden">
                    	<option value='f_permit' selected>否</option>
                    	<option value='f_forbidden'>是</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true" id="cancelEditFieldOption()">取消</button>
        <button class="btn btn-primary" onclick="saveOrUpdateFieldOption()">保存</button>
    </div>
</div>

<input type="hidden" id="fieldId" value=""/>
<input type="hidden" id="fieldType" value=""/>
<input type="hidden" id="fieldDataType" value=""/>
<input type='hidden' id='editFieldId' value=""/>
<input type='hidden' id='editFieldOptionId' value=""/>
<input type='hidden' id='editFieldControlOptionId' value=""/>
<input type="hidden" id="editFieldOptionIndex" value="">

</body>
</html>